package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @Author 梁科
 * @Version 1.0
 * @ Date 2025/10/26 17:35
 */
@Mapper
public interface UserMapper {
    /**
     * 根据openid查找user
     * @param openId
     * @return
     */
    @Select(value = "select * from user where openid = #{openId}")
    public User getByOpenId(String openId);

    /**
     * 保存用户
     * @param user
     */
    void save(User user);

    /**
     * 用户统计
     * @param map
     * @return
     */
    Integer getUserNumber(Map map);
}
